package org.jakim.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author Jakim
 * 
 */
@Entity
@Table(name = "PERSONAL_SKILLS")
public class PersonalSkill implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -12321312312321L;

	@Id
	@GeneratedValue
	@Column(name = "SKILLS_ID")
	private Integer skillId;
	
	@Column(name = "SKILLS_SOCIAL_COMPETENCES")
	private String skillSocial;
	
	@Column(name = "SKILLS_ORGANISATIONAL")
	private String skillOranisational;
	
	@Column(name = "SKILLS_TECHNICAL_COMPETENCES")
	private String skillTechnical;
	
	@Column(name = "SKILLS_ARTISTICS_COMPETENCES")
	private String skillArtistic;
	
	@Column(name = "SKILLS_COMPUTER_COMPETENCES")
	private String skillComputer;
	
	@Column(name = "SKILLS_OTHER_COMPETENCES")
	private String skillOther;

	@Column(name = "SKILLS_TONGUE")
	private String motherLanguage;
	
	@ManyToOne
	@JoinColumn(name = "PERSONAL_INFO_ID")	
	private PersonalInforamation personalInfo;
	
	@Column(name = "SKILLS_DRIVING_LICENCE")
	private String skillDrivingLicence;

	@OneToMany(cascade={CascadeType.ALL})
	@JoinColumn(name="SKILLS_ID")
	private Set<Language> otherLanguages;

	public PersonalSkill(){
		
	}

	public PersonalSkill(String skillSocial, String skillOranisational,
			String skillTechnical, String skillArtistic, String skillComputer,
			String skillOther, String motherLanguage, PersonalInforamation personalInfo,
			String skillDrivingLicence, Set<Language> otherLanguages) {
		super();
		this.skillSocial = skillSocial;
		this.skillOranisational = skillOranisational;
		this.skillTechnical = skillTechnical;
		this.skillArtistic = skillArtistic;
		this.skillComputer = skillComputer;
		this.skillOther = skillOther;
		this.motherLanguage = motherLanguage;
		this.personalInfo = personalInfo;
		this.skillDrivingLicence = skillDrivingLicence;
		this.otherLanguages = otherLanguages;
	}

	public PersonalInforamation getPersonalInfo() {
		return personalInfo;
	}

	public void setPersonalInfo(PersonalInforamation personalInfo) {
		this.personalInfo = personalInfo;
	}

	public Integer getSkillId() {
		return skillId;
	}

	public void setSkillId(Integer skillId) {
		this.skillId = skillId;
	}

	public String getSkillSocial() {
		return skillSocial;
	}

	public void setSkillSocial(String skillSocial) {
		this.skillSocial = skillSocial;
	}

	public String getSkillOranisational() {
		return skillOranisational;
	}

	public void setSkillOranisational(String skillOranisational) {
		this.skillOranisational = skillOranisational;
	}

	public String getSkillTechnical() {
		return skillTechnical;
	}

	public void setSkillTechnical(String skillTechnical) {
		this.skillTechnical = skillTechnical;
	}

	public String getSkillArtistic() {
		return skillArtistic;
	}

	public void setSkillArtistic(String skillArtistic) {
		this.skillArtistic = skillArtistic;
	}

	public String getSkillComputer() {
		return skillComputer;
	}

	public void setSkillComputer(String skillComputer) {
		this.skillComputer = skillComputer;
	}

	public String getSkillOther() {
		return skillOther;
	}

	public void setSkillOther(String skillOther) {
		this.skillOther = skillOther;
	}

	public String getMotherLanguage() {
		return motherLanguage;
	}

	public void setMotherLanguage(String motherLanguage) {
		this.motherLanguage = motherLanguage;
	}

	public String getSkillDrivingLicence() {
		return skillDrivingLicence;
	}

	public void setSkillDrivingLicence(String skillDrivingLicence) {
		this.skillDrivingLicence = skillDrivingLicence;
	}

	public Set<Language> getOtherLanguages() {
		return otherLanguages;
	}

	public void setOtherLanguages(Set<Language> otherLanguages) {
		this.otherLanguages = otherLanguages;
	}
}
